package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50);not null"`
	Password string `gorm:"type:varchar(50);not null"`
}
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50);not null"`
}
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int(10);not null"`
	Rid int `gorm:"type:int(10);not null"`
}
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50);not null"`
}
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int(10);not null"`
	Nid int `gorm:"type:int(10);not null"`
}
type Warehouse struct {
	gorm.Model
	WareName  string `gorm:"type:varchar(50);not null"`
	WareAddr  string `gorm:"type:varchar(50);not null"`
	WareTypes string `gorm:"type:varchar(50);not null"`
}
type Order struct {
	gorm.Model
	OrderName string `gorm:"type:varchar(50);not null"`
	OrderNum  int    `gorm:"type:int(10);not null"`
	Wid       int    `gorm:"type:int(10);not null"`
}
type WarehouseOrder struct {
	WareName  string
	WareAddr  string
	WareTypes string
	OrderName string
	OrderNum  int
	Wid       int
}
